package cn.xerllent.wxtp.utils;

/**
 * 外部联系人变更消息指令
 * @author sxh
 */
public enum ExtContactEnum {

	ADD_EXTERNAL_CONTACT("add_external_contact", "添加企业客户事件"),
	EDIT_EXTERNAL_CONTACT("edit_external_contact", "编辑企业客户事件"),
	ADD_HALF_EXTERNAL_CONTACT("add_half_external_contact", "外部联系人免验证添加成员事件"),
	DEL_EXTERNAL_CONTACT("del_external_contact", "删除企业客户事件"),
	DEL_FOLLOW_USER("del_follow_user", "删除跟进成员事件"),
	CUSTOMER_REFUSED("customer_refused", "客户接替失败事件");

    ExtContactEnum(String key, String desc) {
        this.key = key;
        this.desc = desc;
    }

    public static ExtContactEnum getByInstance(String key){
        for (ExtContactEnum value : ExtContactEnum.values()) {
            if (value.key.equalsIgnoreCase(key)){
                return value;
            }
        }
        return null;
    }
    
    private String key;

    private String desc;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
